package com.han.dao.abstraction.product;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;

import javax.naming.NamingException;

import com.han.bom.Exam;
import com.han.bom.PracticeExam;
import com.han.bom.RealExam;

public interface GenericExamDAO {
	public ArrayList<Exam> retrieveAllExams() throws ClassNotFoundException,
			SQLException, NamingException;

	public Exam retrieveExamById(String examid) throws ClassNotFoundException,
			SQLException, NamingException;

	public ArrayList<Exam> retrieveExamsByProfessor(String profid)
			throws ClassNotFoundException, SQLException, NamingException;

	public HashMap<RealExam, Double> retrieveRealExamsResults(String profid)
			throws ClassNotFoundException, SQLException, NamingException;

	public HashMap<PracticeExam, Double> retrievePracticeExamsResults(
			String profid) throws ClassNotFoundException, SQLException,
			NamingException;

	public ArrayList<Exam> retrieveExamsByStudent(String studentid)
			throws ClassNotFoundException, SQLException, NamingException;

	public ArrayList<Exam> retrieveExamsByKeyword(String key, String profId)
			throws ClassNotFoundException, SQLException, NamingException;

	public boolean insertExam(Exam exam, String profid)
			throws ClassNotFoundException, SQLException, NamingException;

	public boolean updateExam(Exam exam) throws ClassNotFoundException,
			SQLException, NamingException;

	public boolean deleteExam(String examid) throws ClassNotFoundException,
			SQLException, NamingException;

	public boolean addStudentToExam(String studentid, String examid)
			throws ClassNotFoundException, SQLException, NamingException;

	public boolean removeStudentFromExam(String studentid, String examid)
			throws ClassNotFoundException, SQLException, NamingException;

	public int retrieveMaxExamID() throws ClassNotFoundException, SQLException,
			NamingException;

	public int retrieveActivateCount(String examid) throws SQLException,
			ClassNotFoundException, NamingException;

	public boolean updateActivateCount(String examid) throws SQLException,
			ClassNotFoundException, NamingException;

	public ArrayList<Exam> retrieveRealExamsNotTakenByKeyword(String key,
			String studentId) throws ClassNotFoundException, SQLException,
			NamingException;
}
